import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import loginView from '@/view/login.vue'
import mainVIew from '@/view/admin/main'
import empView from '@/view/admin/emp'
import deptView from '@/view/admin/dept'
import welcomeView from '@/view/admin/welcome'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/login',
      component: loginView
    },
    {
      path: '/main',
      component: mainVIew,
      children: [
        { path: '/', component: welcomeView },
        { path: 'emp', component: empView },
        { path: 'dept', component: deptView }
      ]
    }
  
  ]
})
